package com.leapp.sk.ui.activity.task

import android.os.Bundle
import android.support.v4.widget.SwipeRefreshLayout
import com.example.mvp.activity.BaseActivityMVP
import com.example.mvp.binder.BaseDataBinder
import com.leapp.sk.R
import com.leapp.sk.bean.ClassNotifyEntiry
import com.leapp.sk.bean.ParentingTaskEntity
import com.leapp.sk.binder.BaseBinder
import com.leapp.sk.viewdelegate.task.ParentingTaskDelegate

/**
 * 亲子作业
 * @author  chaohaipeng  on 2018/8/3.
 */
class ParentingTaskActivity : BaseActivityMVP<ParentingTaskDelegate>(), SwipeRefreshLayout.OnRefreshListener {
    override fun getDelegateClass(): Class<ParentingTaskDelegate> {
        return ParentingTaskDelegate::class.java
    }

    override fun getDataBinder(): BaseDataBinder<*, *> {
        return BaseBinder()
    }

    override fun initView(p0: Bundle?) {
        viewDelegate.setTitle(resources.getString(R.string.string_task_parenting))
    }

    override fun initDate() {
        val mutableListOf = mutableListOf<ParentingTaskEntity>()
        val parentingTaskEntity = ParentingTaskEntity()
        parentingTaskEntity.type=0
        val parentingTaskEntity1 = ParentingTaskEntity()
        parentingTaskEntity1.type=1
        mutableListOf.add(parentingTaskEntity)
        mutableListOf.add(parentingTaskEntity1)
        viewDelegate.initAdapter(this, mutableListOf, this)
    }

    override fun bindEvenListener() {
    }

    override fun onRefresh() {
        viewDelegate.stopSwipRefresh()
    }
}